package com.xqboss.apps.domain.game;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xqboss.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author HaoLun
 * @since 2022-01-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "GameInsurance对象", description = "")
public class GameInsurance extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "保期")
    private Integer insuranceNum;

    private Integer insuranceUnit;

    private BigDecimal insuranceAmount;

    @ApiModelProperty(value = "比例类型时收取的最小金额")
    private BigDecimal minAmount;

    @ApiModelProperty(value = "是否开启比例类型时的最小金额")
    private Boolean openMin;

    @ApiModelProperty(value = "保额类型 1固定金额 2比例")
    private Integer insuranceType;

    @ApiModelProperty(value = "游戏ID")
    private Long gameId;

    @ApiModelProperty("是否永久 1是 0否")
    private Integer isForever;

    @JsonIgnore
    @TableLogic(value = "null", delval = "now()")
    protected Date deleteTime;
}
